<template>
  <div class="web-opinion">
    <el-card v-for="(v, k) in loadListModel.dataArr" :key="k" class="box-card">
      <div slot="header" class="clearfix">
        <span class="name">{{ v.name }}</span>
        <span class="time w-float-right">{{ v.dateStr }}</span>
      </div>
      <div class="content">{{ v.content }}</div>
    </el-card>
    <!--底部加载更多-->
    <w-load-more
      :loadType="loadListModel.loadType"
      @loadMore="loadData"
    />
  </div>
</template>

<script lang="ts">
/*意见建议*/
import FeedBackModel from "@/models/FeedBack";
import WLoadMore from "@/components/pc/loadMore/index.vue";
import YBListLoad from "@/models/YBListLoad";
import API from "@/api/apis";
import { Component, Vue } from "vue-property-decorator";

@Component({
  components: {
    WLoadMore
  }
})
export default class WebOpinion extends Vue {
  loadListModel = new YBListLoad(FeedBackModel, API.feedback.all, {});

  // 加载列表数据
  loadData() {
    this.loadListModel
      .loadData()
      .then(() => {})
      .catch(() => {});
  }
}

</script>

<style lang="scss" scoped>
.web-opinion {
  padding-top: 20px;
  .box-card {
    margin: 20px;
    display: block;
  }
  .box-card:nth-child(1) {
    margin-top: 0;
  }
  .name {
    font-size: 16px;
    color: #333;
  }
  .time {
    font-size: 14px;
    color: #999;
  }
  .content {
    font-size: 14px;
    color: #666;
  }
}
</style>
